// 如果玩家最后输入了"疯狂米塔"(输入正确)显示的页面设计

// 关闭VSCode非必要报错
// ignore_for_file: camel_case_types

import 'package:crazy_mita_problem_project/main.dart';
import 'package:flutter/material.dart';

class Pages_EndIfInputCorrectly extends StatefulWidget {
  const Pages_EndIfInputCorrectly({super.key});

  @override
  State<Pages_EndIfInputCorrectly> createState() => _Pages_EndIfInputCorrectlyState();
}

class _Pages_EndIfInputCorrectlyState extends State<Pages_EndIfInputCorrectly> {
  
  @override
  void initState ()    // 覆写父类构造函数
    {
      super.initState();
      player.resume();    // 控制全局对象播放音频
    }
  @override
  void dispose ()   // 覆写父类析构函数
    {
      super.dispose();
    }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Color.fromRGBO(255,202,211,130),
      body: Padding(
        padding: const EdgeInsets.only(top:18.0,left:18.0,bottom:30),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Row(
              mainAxisAlignment: MainAxisAlignment.start,
              children: [
                Text(
                  "留下来吧,玩家,\n和我在一起！(｡>∀",
                  style: TextStyle(
                    fontSize: 90,
                    color: Color.fromRGBO(108, 92, 231, 1.0),
                    fontWeight: FontWeight.bold,
                  ),
                ),
              ],
            ),
            Container(
              width:350,
              height:350,
              decoration: BoxDecoration(
                borderRadius: BorderRadius.circular(15),   // 设置容器外围圆角大小
                boxShadow: [
                  BoxShadow(
                    color: Colors.grey.shade400.withAlpha(78), // 阴影颜色
                    spreadRadius: 4,  // 阴影扩散半径
                    blurRadius: 2,   // 阴影模糊半径
                    offset: Offset(0, 1), // 阴影偏移量
                  ),
                ],
              ),
              child: ClipRRect(     // ClipRRect用于强制将子控件剪裁为圆角等
                borderRadius: BorderRadius.circular(15),     // 设置剪裁容器圆角大小与外围Container相同
                child: Image.asset(
                  'assets/images/crazy_mita_be_player.png',
                  fit: BoxFit.cover,
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
